#ifndef SpriteBatch_H
#define SpriteBatch_H
#include "Texture.h"
#include "math_3d.h"
#include "FreeTypeFont.h"
#include "RenderContext.h"
enum SpriteEffects
{
	None,FlipHorizontally,FlipVertically
};
class SpriteBatch
{
public:
	SpriteBatch(RenderContext* context);
	~SpriteBatch(void);
	void begin();
	void end();
	void dispose();
	void draw(V3F_C4B_T2F_Quad quad);
	void draw(Texture* texture,Rect destinationRectangle,Color4B color);
	void draw(Texture* texture,Point position,Color4B color);
	void draw(Texture* texture,Rect destinationRectangle,Size texCoord,Color4B color);
	void draw(Texture* texture,Point position,Size texCoord,Color4B color);
	// all in one
	void draw(Texture* texture = NULL,Rect destinationRectangle = RectZero,Size texCoord = SizeOne,Color4B color = ColorWhite,float rotation = 0.0f,Point origin = PointZero,Point scale = PointOne,SpriteEffects effects = None);
	void draw(Texture* texture,Point position,Size texCoord,Color4B color,float rotation,Point origin,Point scale,SpriteEffects effects);
	void drawString(wchar_t* _strText,int x , int y, int maxW , int h,Color4B color);
	void drawString(FreeTypeFont*  font,std::string text, Point position,Color4B color);
	void drawString(FreeTypeFont*  font,std::string text, Point position,Color4B color,float rotation,Point origin,Point scale);
private:
	RenderContext* pContext;

};
#endif


